home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / misc / mmulib / include / libraries / disassembler.h < prev    next >
C/C++ Source or Header  |  1999-11-29  |  3KB  |  64 lines

  1. /*************************************************************************
  2.  ** disassembler.library                                                **
  3.  **                                                                     **
  4.  ** a simple system library for disassembling a86K binaries             **
  5.  **                                                                     **
  6.  ** © 1999 THOR-Software, Thomas Richter                                **
  7.  ** No commercial use, reassembly, modification without prior, written  **
  8.  ** permission of the authors.                                          **
  9.  ** Including this library in any commercial software REQUIRES a        **
  10.  ** written permission and the payment of a small fee.                  **
  11.  **                                                                     **
  12.  **---------------------------------------------------------------------**
  13.  ** Definition of the library, and structures                           **
  14.  **                                    **
  15.  ** $VER: 40.2 (31.10.99) © THOR                                   **
  16.  *************************************************************************/
  17.  
  18. #ifndef LIBRARIES_DISASSEMBLER_H
  19. #define LIBRARIES_DISASSEMBLER_H
  20.  
  21. #ifndef EXEC_TYPES_H
  22. #include <exec/types.h>
  23. #endif
  24.  
  25. #ifndef EXEC_LIBRARIES_H
  26. #include <exec/libraries.h>
  27. #endif
  28.  
  29. /* There's really nothing in this library base you need to care about */
  30.  
  31. struct DisassemblerBase {
  32.         struct Library  dllib_Library;
  33.         /* more below this point */
  34. };
  35.  
  36. #define DISASSEMBLER_NAME "disassembler.library"
  37.  
  38.  
  39. /* The one and only structure you need to care about. This one is
  40.    passed in to Disassemble() */
  41.  
  42. struct DisData {
  43.         APTR            ds_From;        /* base to start disassembly from */
  44.         APTR            ds_UpTo;        /* where to stop it */
  45.         APTR            ds_PC;          /* the disassembler prints a "*" here */
  46.         void           *ds_PutProc;     /* to avoid casts, this is a void *. */
  47.         APTR            ds_UserData;    /* passed to the PutProc in a1 and a3 */
  48.         APTR            ds_UserBase;    /* passed to the PutProc in a4 */
  49.         UWORD           ds_Truncate;    /* limit width of the output */
  50.         UWORD           ds_reserved;    /* this is currently reserved */
  51. };
  52.  
  53. /* PutProc is actually a function pointer, but due to different compilers
  54.    and conventions defined here as a void *. It is called with the
  55.    character to print in d0, the user data in a1 and a3 and the user
  56.    base in a4. This is most useful for C code.
  57.  
  58.    The library functions are interrupt-callable, provided your PutProc
  59.    is.
  60. */
  61.  
  62. #endif
  63.  
  64.